#ifndef QGRADIENTTOOL_H
#define QGRADIENTTOOL_H

#include "qmytool.h"
#include <QBrush>
#include <QGraphicsItem>
class  TOOLS_EXPORT QGradientTool : public QMyTool
{
	Q_OBJECT

public:
	QGradientTool(QObject *parent=0);
	~QGradientTool();
    virtual void contextMenuEvent(QGraphicsSceneContextMenuEvent * contextMenuEvent);
    virtual void mouseMoveEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mousePressEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mouseReleaseEvent(QGraphicsSceneMouseEvent * mouseEvent);
    virtual void mouseDoubleClickEvent(QGraphicsSceneMouseEvent * mouseEvent );


private:
	QPointF start,end;
	QLinearGradient gradient;
	QGraphicsItem *target;
	bool begin_edit;
};

#endif // QGRADIENTTOOL_H